package com.uk.data.containers;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import com.uk.data.ejbs.IFaturaBean;
import com.uk.data.entities.Fatura;
import com.uk.data.entities.Kontrata;
import com.vaadin.data.util.BeanItemContainer;

public class FaturaContainer extends BeanItemContainer<Fatura> implements Serializable{

	public FaturaContainer(
			Collection<? extends Fatura> collection)
			throws IllegalArgumentException {
		super(Fatura.class, collection);
		
	}


	public static FaturaContainer createFromEjb(IFaturaBean faturaBean, Kontrata kontrata, int maxResult){
		FaturaContainer faturaContainer = new FaturaContainer( faturaBean.queryLatestFatura(kontrata, maxResult));
		return faturaContainer;
	}
	
}
